using System;
using System.Collections.Generic;
using SouthernLand.Common.DAL.NhaDat;

namespace SouthernLand.Common.BOL.NhaDat
{
    public class RaovatSave
    {
        #region Public Properties

        public Int32 RaovatSaveID { get; set; }

        public Int32 RaovatID { get; set; }

        public String UserID { get; set; }

        public DateTime AddedDate { get; set; }

        #endregion

        #region public static Methods

        public static int Insert(RaovatSave obj)
        {
            var db = new RaovatSaveDAL();
            return db.Insert(obj);
        }

        public static bool Update(RaovatSave obj)
        {
            var db = new RaovatSaveDAL();
            return db.Update(obj);
        }

        public static bool Delete(Int32 RaovatSaveID)
        {
            var db = new RaovatSaveDAL();
            return db.Delete(RaovatSaveID);
        }

        public static bool DeleteByRaovatId(Int32 RaovatID)
        {
            var db = new RaovatSaveDAL();
            return db.DeleteByRaovatId(RaovatID);
        }

        public static RaovatSave GetRaovatSaveByID(Int32 RaovatSaveID)
        {
            var db = new RaovatSaveDAL();
            return db.GetRaovatSaveByID(RaovatSaveID);
        }

        //Get All RaovatSave
        public static List<RaovatSave> GetAllRaovatSave()
        {
            var db = new RaovatSaveDAL();
            return db.GetAllRaovatSave(1, 10000);
        }

        //Get All RaovatSave
        public static List<RaovatSave> GetAllRaovatSave(int PageIndex, int PageSize)
        {
            var db = new RaovatSaveDAL();
            return db.GetAllRaovatSave(PageIndex, PageSize);
        }

        // Get Count All records of Table  RaovatSave
        public static int GetCountRaovatSave()
        {
            var db = new RaovatSaveDAL();
            return db.GetCountRaovatSave();
        }

        // Get RaovatSaveByUserID
        public static List<RaovatSave> GetRaovatSaveByUserID(String UserID, int PageIndex, int PageSize)
        {
            var db = new RaovatSaveDAL();
            return db.GetRaovatSaveByUserID(UserID, PageIndex, PageSize);
        }

        // Get RaovatSaveCountByUserID
        public static int GetRaovatSaveCountByUserID(String UserID)
        {
            var db = new RaovatSaveDAL();
            return db.GetRaovatSaveCountByUserID(UserID);
        }

        #endregion
    }
}